package com.io.buffered_writer;
import java.io.*;
//��дjava�����ȡWindowsĿ¼�µ�win.ini�ļ�, ����ȡ������
public class BufferedReader11 {
	public static void main(String[] args) {
		String line=null;
		FileReader fr=null;
		FileWriter fw = null;
		BufferedReader br=null;
		BufferedWriter bw = null;
		StringBuffer sb=null;
		try{
				sb=new StringBuffer();
				//1.��������������, �����ȡ�ı��ļ�
				 fr = new FileReader("C:\\���.txt");
				 br = new BufferedReader(fr);
				//2.�������������, �����ļ�����д�뵽ָ���ı��ļ���(���ļ�ĩβ׷��)
				 //fw = new FileWriter("D:\\���.txt");
				 //bw = new BufferedWriter(fw);
				//3.ѭ����ȡ��׷���ַ�
				while( (line = br.readLine() ) != null ){
					sb.append(line);
				}
				System.out.println("�ļ�������\n"+sb);
				//fw.write(newString);
		} catch (IOException e) {
				e.printStackTrace();
		}finally{
				try {
					fr.close();
					br.close();
					//bw.close();
					//fw.close();//�ر��ļ������
				}catch (IOException e) {
					e.printStackTrace();
				}
		}
	}
}
